package reference;

import lombok.Data;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * ***********************************************************
 * Copyright  2019 八维通科技有限公司 Inc.All rights reserved.  *
 * ***********************************************************
 * <p>
 * description:
 *
 * @author zjf
 * @date 2020-11-20 01:44:55
 */
@Data
public class RefBean {
    private String name;
    private Integer age;

    private static final AtomicInteger inc = new AtomicInteger();

    public RefBean() {
      inc.compareAndSet(inc.get(), 1);
        this.name = inc.get() + "";
        this.age = inc.get() + 1;
    }
}
